Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

156
Views
Is it possible to use "it" within support folder? Cypress

community! I have looked up many resources including cypress.io, but didn't find such info. So, I'm guessing cypress doesn't support this opportunity but maybe someone has some clues.

Is Cypress able to use the test block "it" within "support" folder with Custom Commands or can I only use it within "integration" folder?

I have a lot of API requests where, for example, the response 200 is similar to each other. It would be fine to reuse these expects like reusable functions in Custom Commands

The next expects I would want to reuse for the different spec.js. Is it possible?

it('Response has status 200', () => {
    expect(responseBody.status).to.eq(200)
})
it('Field "success" has value "true"', () => {
    expect(responseBody.body.status.success).to.eq(true)
})
it('Field "code" has response "200"', () => {
    expect(responseBody.body.status.code).to.eq(200)
})
it('Field "message" has value "OK"', () => {
    expect(responseBody.body.status.message).to.eq("OK")
})
it('Check the length of the list', () => {
    expect(responseBody.body.result.length).to.be.eq(237)
})
it('Check the USA is present in the list', () => {
    expect(responseBody.body.result[224].name).to.eq("United States")
})
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!